package com.example.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author YuanYuan
 * @Date 2023/6/5
 * @Time 0:20
 */

@RequestMapping("/User")
@Controller
@ResponseBody//用来设置当前类中所有的方法返回的是数据而非页面
public class UserController {
    private static final Logger logger = LoggerFactory.getLogger(UserController.class);

    @RequestMapping("/hi")
    public String sayHi() {
        logger.trace("trace");
        logger.debug("debug");
        logger.info("info");
        logger.warn("warn");
        logger.error("error");
        return "hi，spring boot yuan！";
    }
}
